import { pubRequire } from '@utils/public'
const baseUrl = '/lifes'
//作品维护列表
export function getPreserveList(obj, callbBack, errBack) {
  return pubRequire('get', `${baseUrl}/videos`, obj, callbBack, errBack)
}
//批量删除
export function delItem(obj, callbBack, errBack) {
  return pubRequire('delete', `${baseUrl}/videos`, obj, callbBack, errBack)
}
//我的发布列表
export function getMineList(obj, callbBack, errBack) {
  return pubRequire('get', `${baseUrl}/videos/me`, obj, callbBack, errBack)
}
//获取最新编辑者
export function editor(id, callbBack, errBack) {
  return pubRequire(
    'get',
    `${baseUrl}/${id}/videos/latest-editor`,
    '',
    callbBack,
    errBack
  )
}
//修改虚拟分享量
export function changeShare(id, obj, callbBack, errBack) {
  return pubRequire(
    'put',
    `${baseUrl}/${id}/videos/share-counts`,
    obj,
    callbBack,
    errBack
  )
}
//修改虚拟分播放量
export function changePlay(id, obj, callbBack, errBack) {
  return pubRequire(
    'put',
    `${baseUrl}/${id}/videos/play-counts`,
    obj,
    callbBack,
    errBack
  )
}
//单个删除
export function delSingle(id, obj, callbBack, errBack) {
  return pubRequire(
    'delete',
    `${baseUrl}/${id}/videos`,
    obj,
    callbBack,
    errBack
  )
}
